<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <meta charset="UTF-8">
  <title>品牌商信息</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap-4.6.2-dist/css/bootstrap.css">
</head>
<body style="padding: 20px">

<h2>品牌商信息</h2>

<form action="${pageContext.request.contextPath}/manufacturer/update" method="post">
  <input type="hidden" name="id" value="${manufacturer.id}">

  <div class="form-group">
    <label for="name">厂商名称：</label>
    <input type="text" class="form-control" id="name" name="name" value="${manufacturer.name}" required>
  </div>
  <div class="form-group">
    <label for="address">厂商地址：</label>
    <input type="text" class="form-control" id="address" name="address" value="${manufacturer.address}" required>
  </div>
  <div class="form-group">
    <label for="phone">电话：</label>
    <input type="text" class="form-control" id="phone" name="phone" value="${manufacturer.phone}" required>
  </div>
  <div class="form-group">
    <label for="email">电子邮件：</label>
    <input type="email" class="form-control" id="email" name="email" value="${manufacturer.email}" required>
  </div>
  <div class="form-group">
    <label for="website">网站：</label>
    <input type="text" class="form-control" id="website" name="website" value="${manufacturer.website}">
  </div>
  <div class="form-group">
    <label for="industry">行业：</label>
    <input type="text" class="form-control" id="industry" name="industry" value="${manufacturer.industry}" required>
  </div>

  <button type="submit" class="btn btn-primary">修改</button>
</form>

</body>

<script>
  <c:if test="${not empty successMessage}">
  alert("${successMessage}");
  </c:if>
</script>

</html>
